import { createStore } from 'vuex'
import { ref } from 'vue'
import { SETKEY } from './types'

export default createStore({
  state: {
    language: {
      locale: null,
      dateLocale: null
    },
    role: null,
  },
  mutations: {
    setLanguage(state, language) {
      state.language = language
    },
    setRole(state, value) {
      state.role = value
    },
    setKey(state, value) {
      state[SETKEY] = value
    }  
  },
  getters: {
    getRole(state) {
      return state.role
    }
  },
  actions: {
  },
  modules: {
  }
})
